package com.qf.controller;

import cn.com.webxml.MobileCodeWS;
import cn.com.webxml.MobileCodeWSSoap;
import com.qf.entity.MyJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 2019/11/29
 * 郭程鹏
 * gcp1909
 * 面向代码面向君,不负时光不负卿
 */
@Controller
public class WebServiceController {

    @Autowired
    private MobileCodeWSSoap soap;

    @RequestMapping("/getPhoneAdress")
    @ResponseBody
    public MyJson getPhoneAddr(String phone){


        MyJson myJson = new MyJson();

        //根据手机号查询
        String info = soap.getMobileCodeInfo(phone, "");

        String[] split = info.split("：");

        myJson.setMessage(split[1]);

        return myJson;
    }
}
